//
//  EquipmentService.h
//  AILock
//
//  Created by 谭亚明 on 2020/7/6.
//  Copyright © 2020 tym. All rights reserved.
//

#import "LMJBaseRequest.h"
#import "EquipmentModel.h"
#import "AddRessModel.h"
#import "EquipmentMessageModel.h"
#import "UserModel.h"
#import "RepairsApplyModel.h"
#import "EquipmentUserModel.h"
#import "EquipmentTypeModel.h"
NS_ASSUME_NONNULL_BEGIN

/** 获取系统字典*/
#define urlSysdictfindsysdictbytype @"/sys-dict/find-sys-dict-by-type"


/** 创建设备保修申请*/
#define urlCreateequipmentrepairsapply @"/equipment-repairs-apply/create-equipment-repairs-apply"

/** 获取开关锁状态*/
#define urlGetopenclosedoorstatus @"/equipment/get-open-close-door-status"

/** 远程开锁*/
#define urlOpenclosedoorapply  @"/equipment/open-close-door"

/**获取不是此房间的家庭设备*/
#define urlGetNoRoomEquipments @"/equipment/no-room-equipments"

/** 添加设备*/
#define urlCreateequipment  @"/equipment/create-equipment"

/** 查找设备类型*/
#define urlFindequipmenttypelist @"/equipment/find-equipment-type-list"

/** 移动设备*/
#define urlMoveequipment @"/equipment/move-equipment"

/** 添加指纹锁用户*/
#define urlAdduserlock  @"/equipment-user/add-user-lock"

/** 修改指纹锁用户*/
#define urUpdateuserlock @"/equipment-user/update-user-lock"

/** 删除指纹锁用户*/
#define urlDeleteuserlock @"/equipment-user/delete-user-lock"

/** 预约安装登记*/
#define urlCreateequipmentsubscribe  @"/equipment-subscribe-install/create-equipment_subscribe"

/** 修改设备信息*/
#define urlUpdateequipment @"/equipment/update-equipment"

/** 获取房间所有设备*/
#define urlRoomequipments @"/equipment/room-equipments"

/** 获取设备详情*/
#define urlEquipmentinfo  @"/equipment/equipment-info"

/** 获取设备配置详情*/
#define urlEquipmentconfiginfo  @"/equipment/equipment-config-info"

/** 查找报警记录*/
#define urlFindequipmentalarmpage @"/equipment/find-equipment-alarm-page"

/**设备操作查询*/
#define urlFindOperationpage @"/equipment/find-operation-page"


/**根据用户删除设备用户*/
#define urlEeleteequipmentuserbyuser @"/equipment-user/delete_equipment-user-byuser"

/** 查找开关门记录*/
#define urlFindequipmentoperationpage  @"/equipment/find-equipment-operation-page"

/**设备用户(指纹/密码/卡片)列表*/
#define urlEquipmentuserlist  @"/equipment-user/list"

/**指纹锁用户换绑用户(用户拉取其他指纹、密码)*/
#define urlEquipmentuserequipmentuserupdatebindappuser  @"/equipment-user/equipment-user-update-bind-app-user"

/**设备用户(指纹/密码/卡片)列表*/
#define urlEquipmentusernottheuserlist  @"/equipment-user/not-theuser-list"


/** 获取设备用户（指纹，密码，卡）详情*/
#define urlEquipmentusergetdetail @"/equipment-user/get-detail"

/** 设备用户-每个类型的列表*/
#define urlListgroupall  @"/equipment-user/list-group-all"

/** 提示音管理*/
#define urlWarningtonemanager  @"/equipment/warning-tone-manager"

/** 开门方式*/
#define urlOpendoorway  @"/equipment/open-door-way"

/** 信息推送*/
#define urlInformationpush @"/equipment/information-push"

/** 远程开门权限*/
#define urlRemoteaccesspermission @"/equipment/remote-access-permission"

/** 开锁参数*/
#define urlOpenlockparameter @"/equipment/open-lock-parameter"

/** 验证管理员*/
#define urlVerifyadminrole @"/equipment/verify-admin-role"

/** 获取家庭所有用户列表（家庭成员、游客用户）*/
#define urlEquipmentuseruserall @"/equipment-user/user-all"


/** 指纹锁用户绑定app用户或游客用户*/
#define urlEquipmentuserbindappuser @"/equipment-user/equipment-user-bind-app-user"

#define urlendingOperation @"/equipment/ending-operating"

/** 设备关联用户列表*/
#define urlEquipmentuseruserlist  @"/equipment-user/user-list"

/** 设备关联用户详情*/
#define urlEquipmentuseruserdetail @"/equipment-user/user-detail"


/** 删除设备*/
#define urlDeleteequipment @"/equipment/delete-equipment"

/** app发起同步设备用户*/
#define urlSynchronizeappuser @"/equipment-user/synchronize-app-user"

/** 查询信号强度*/
#define urlQuerywifistrength @"/equipment/query-wifi-strength"

/** 获取地址对象*/
#define urlAreaInfoAll @"/area/infoAll"

/** 查询家庭设备报修列表*/
#define urlEquipmentrepairsapplypage @"/equipment-repairs-apply/find-equipment-repairs-apply-page"

/** 查询报修详情*/
#define urlRepairsapplydetail @"/equipment-repairs-apply/find-equipment-repairs-apply-detail"


/** 查询预约安装信息登记*/
#define urlEquipmentsubscribeinstalllist @"/equipment-subscribe-install/find-list"

/** 查询预约安装信息登记*/
#define urlcancelEquipmentsubscribeinstallapply @"/equipment-subscribe-install/cancel-equipment-subscribe-install-apply"

/** 取消设备保修*/
#define urlCancelequipmentrepairsapply @"/equipment-repairs-apply/cancel-equipment-repairs-apply"

/** 设备校时*/
#define urlEquipmenttiming @"/equipment/timing"

/** 修改设备用户名称*/
#define urlEquipmentuserupdatelockusername @"/equipment-user/update-lock-user-name"


@interface EquipmentService : LMJBaseRequest

/*修改设备用户名称*/
-(void)getEquipmentEquipmentUserAuthId:(NSInteger)authId
equipmentUserName:(NSString*)equipmentUserName
                            completion:(void(^)(LMJBaseResponse*resp))completion;

/*获取系统字典*/
-(void)getEquipmentSysDictdictType:(NSString*)dictType
                completion:(void(^)(LMJBaseResponse*resp,NSArray<EquSubSysDict*>*  sysArray))completion;

/*创建设备保修申请*/
-(void)getCreateequipmentrepairsapplyID:(NSInteger)equipmentId
mobile:(NSString*)mobile
userName:(NSString*)userName
address:(NSString*)address
phots:(NSString*)photoStr
video:(NSString*)videoStr
applyDesc:(NSString*)applyDesc
provinceCode:(NSInteger)provincecode
province:(NSString*)province
cityCode:(NSInteger)cityCode
city:(NSString*)city
districtCode:(NSString*)districtCode
district:(NSString*)district
rentLng:(NSString*)rentLng
rentLat:(NSString*)rentLat
                     completion:(void(^)(LMJBaseResponse  *respons))completion;


/*获取开关锁状态*/
-(void)getEquipmentequipmentId:(NSInteger)equipmentId
                completion:(void(^)(LMJBaseResponse*resp,EquipmentModel *equipment))completion;


/*远程开锁*/
-(void)getOpenclosedoorapplyequipmentId:(NSInteger)equipmentId commandType:(NSInteger)commandType
operationPassword:(NSString*)operationPassword
completion:(void(^)(LMJBaseResponse  *respons))completion;

/*添加设备*/
-(void)getAddEquipmentWithType:(NSInteger)equipmentTypeId
  macAddress:(NSString*)macAddress
   ipAddress:(NSString*)ipAddress
familyRoomId:(NSInteger)familyRoomId
    familyId:(NSInteger)familyId
    wifiName:(NSString*)wifiName
                    completion:(void(^)(NSError *error, LMJBaseResponse *response))completion;

/*获取不是此房间的家庭设备*/
-(void)getNOroomequipments:(NSInteger)familyRoomId
                completion:(void(^)(NSError *error,NSArray<EquipmentModel*>  *array))completion;

/*查找设备类型*/
-(void)getFindequipmenttypelistcompletion:(void(^)(NSError *error,NSArray<EquipmentTypeModel*>  *array))completion;


/*移动设备*/
-(void)getMoveEquipment:(NSArray*)ids
  familyRoomId:(NSInteger)familyRoomId
                    completion:(void(^)(LMJBaseResponse *response))completion;


/*修改设备信息*/
-(void)getUpdateequipment:(NSInteger)ids
  name:(NSString*)name
               completion:(void(^)(NSError *error, LMJBaseResponse *response))completion;


/*获取房间所有设备*/
-(void)getRoomequipments:(NSInteger)familyRoomId
               completion:(void(^)(LMJBaseResponse *respons,NSArray<EquipmentModel*>  *array))completion;


/*获取设备详情*/
-(void)getEquipmentinfo:(NSInteger)equipmentId
             completion:(void(^)(NSError *error,EquipmentModel  *equipmentModel))completion;


/*获取设备配置详情*/
-(void)getEquipmentconfiginfo:(NSInteger)equipmentId
             completion:(void(^)(NSError *error,Equipmentconfig  *equipmentConfig))completion;



/*删除设备*/
-(void)getDeleteEquimpentWithID:(NSInteger)equipmentId completion:(void(^)(LMJBaseResponse  *respons))completion;


/*获取地址对象*/
-(void)getAddressWithType:(NSInteger)type
code:(NSString*)code
               completion:(void(^)(LMJBaseResponse *respons,NSArray<AddRessModel*>  *array))completion;

/*提示音管理*/
-(void)getWarningtonemanagereEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parameteType:(NSString*)parameterType
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;

/*开门方式*/
-(void)getOpendoorwayEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parameteType:(NSString*)parameterType
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;

/*信息推送*/
-(void)getInformationpushEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parameteType:(NSString*)parameterType
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;

/*远程开门权限*/
-(void)getRemoteaccesspermissionEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;

/*开锁参数*/
-(void)getOpenlockparameterEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parameteType:(NSString*)parameterType
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;


/*提示音管理*/
-(void)getWarningtonemanagerEuipmentId:(NSInteger)equipmentId action:(NSString*)action
parameteType:(NSString*)parameterType
parmeteValue:(NSString*)parameterValue
               completion:(void(^)(LMJBaseResponse *respons))completion;


/*设备用户(指纹/密码/卡片)列表*/
-(void)getEquipmentuserList:(NSInteger)equipmentId equipmentUserType:(NSString*)equipmentUserType
userId:(NSInteger)userId
type:(NSInteger)type
               completion:(void(^)(LMJBaseResponse *respons,NSArray<EquipmentUserModel*>*array))completion;

/*获取设备用户（指纹，密码，卡）详情*/
-(void)getEquipmentusergetdetail:(NSInteger)equipmentUserId
               completion:(void(^)(LMJBaseResponse *respons,EquipmentUserModel*userModel))completion;

/*设备用户-每个类型的列表*/
-(void)getEquipmentuserlistgroupallEquipment:(NSInteger)equipmentId
type:(NSInteger)type
               completion:(void(^)(LMJBaseResponse *respons,EquUsers *users))completion;

/*设备关联用户列表*/
-(void)getEquipmentuseruserlistEquipment:(NSInteger)equipmentId
type:(NSInteger)type
               completion:(void(^)(LMJBaseResponse *respons,NSArray <UserModel*>*array))completion;

/*设备关联用户详情*/
-(void)getEquipmentuseruserdetail:(NSInteger)equipmentId
userId:(NSInteger)userId
type:(NSInteger)type
                       completion:(void(^)(LMJBaseResponse *respons,UserModel *usermodel))completion;

/*获取家庭所有用户列表（家庭成员、游客用户）*/
-(void)getEquipmentuseruserall:(NSInteger)equipmentId
familyId:(NSInteger)familyId
                       completion:(void(^)(LMJBaseResponse *respons, NSArray<UserModel*> *users))completion;

/*添加指纹锁用户*/
-(void)getEquipmentAdduserlockequipmentId:(NSInteger)equipmentId
equipmentUserType:(NSString*)equipmentUserType
effectiveTime:(NSString*)effectiveTime
userRole:(NSInteger)userRole
startTime:(NSString*)startTime
endTime:(NSString*)endTime
start:(NSString*)start
end:(NSString*)end
validWeek:(NSString*)validWeek
type:(NSInteger)type
userId:(NSInteger)userId
name:(NSString*)name
                       completion:(void(^)(LMJBaseResponse *respons))completion;


/*修改指纹锁用户*/
-(void)getEquipmentUpdateuserlockpmentId:(NSInteger)equipmentId
effectiveTime:(NSString*)effectiveTime
userRole:(NSInteger)userRole
startTime:(NSString*)startTime
endTime:(NSString*)endTime
validWeek:(NSString*)validWeek
equipmentUserAuthId:(NSInteger)equipmentUserAuthId
star:(NSString*)star
                                    end:(NSString*)end
equipmentUserName:(NSString*)equipmentUserName
                       completion:(void(^)(LMJBaseResponse *respons))completion;

/*删除指纹锁用户*/
-(void)getEquipmentdeleteuserlockEpumentId:(NSInteger)equipmentId
equipmentUserIDs:(NSString*)equipmentUserIDs
                       completion:(void(^)(LMJBaseResponse *respons))completion;


/*验证管理员*/
-(void)getVerifyadminroleEpumentId:(NSInteger)equipmentId
                       completion:(void(^)(LMJBaseResponse *respons))completion;


/*获取不是此用户的所有对应的设备用户列表(指纹/密码/卡片)*/
-(void)getEquipmentNottheuserlistEquipmentId:(NSInteger)equipmentId
equipmentUserType:(NSString*)equipmentUserType
userId:(NSInteger)userId
type:(NSInteger)type
                       completion:(void(^)(LMJBaseResponse *respons, NSArray<EquipmentUserModel*> *users))completion;

/*指纹锁用户换绑用户(用户拉取其他指纹、密码)*/
-(void)getBindappuser:(BindAppUser*)bingReq
                       completion:(void(^)(LMJBaseResponse *respons))completion;

/*指纹锁用户换绑用户(用户拉取其他指纹、密码)*/
-(void)getFindequipmentrepairsapplyFamilyID:(NSInteger)familyId
page:(NSInteger)page
size:(NSInteger)size
                       completion:(void(^)(LMJBaseResponse *respons, NSArray<RepairsApplyModel*> *repair))completion;


-(void)getFindEquipmentsubscribeinstallcontactscontacts:(NSInteger)page

                                             completion:(void(^)(LMJBaseResponse *respons, NSArray<RepairsApplyModel*> *repair))completion;

/*查找开关门记录*/
-(void)getFindequipmentoperationEquipmentID:(NSInteger)equipmentId
page:(NSInteger)page
completion:(void(^)(LMJBaseResponse *respons, NSArray<EquipmentMessageModel*> *repair))completion;

/*查找报警记录*/
-(void)getFindequipmentAlarmEquipmentID:(NSInteger)equipmentId
page:(NSInteger)page
completion:(void(^)(LMJBaseResponse *respons, NSArray<EquipmentMessageModel*> *repair))completion;


/*取消预约安装*/
-(void)getcancelEquipmentsubscribeinstallapplyID:(NSInteger)id
completion:(void(^)(LMJBaseResponse *respons))completion;

/*取消设备保修*/
-(void)getcancelEquipmentrepairsapplyID:(NSInteger)id
completion:(void(^)(LMJBaseResponse *respons))completion;

/*获取设备详情*/
-(void)getEquipmentinfoWithEqipmentID:(NSInteger)equipID
completion:(void(^)(LMJBaseResponse *respons,EquipmentModel*mdoel))completion;

//urlSynchronizeappuser
/*app发起同步设备用户*/
-(void)getEquipmentSynchronizeappuserEqipmentID:(NSInteger)equipID
completion:(void(^)(LMJBaseResponse *respons,EquipmentModel*mdoel))completion;

//设备校时
-(void)getEquipmenttimingEqipmentID:(NSInteger)equipID
completion:(void(^)(LMJBaseResponse *respons,EquipmentModel*mdoel))completion;


/*设备操作查询*/
-(void)getFindoperationpageEquipmentID:(NSInteger)equipmentId
page:(NSInteger)page
                            completion:(void(^)(LMJBaseResponse *respons, NSArray<EquipmentMessageModel*> *repair))completion;


//根据用户删除设备用户
-(void)getEquipmentEeleteequipmentuserbyuserId:(NSInteger)userId
type:(NSInteger)type
equipmentId:(NSInteger)equipmentId
deleteEquipmentUser:(BOOL)isDelete
completion:(void(^)(LMJBaseResponse *respons))completion;


//指纹锁用户绑定app用户或游客用户
-(void)getEquipmentuserbindappuserEquipuserId:(NSInteger)userId
userId:(NSInteger)userId
type:(NSInteger)type
completion:(void(^)(LMJBaseResponse *respons,EquipmentUserModel *userModel))completion;

//操作结束
-(void)getendingoperatinEquipuserId:(NSInteger)equipmentId
commandType:(NSInteger)commandType
busiType:(NSInteger)busiType
completion:(void(^)(LMJBaseResponse *respons))completion;


@end

NS_ASSUME_NONNULL_END
